const fs = require('fs');

const {resolve} = require('path')

let url = resolve(__dirname,'../视频');

// 判断文件目录是否存在
let result = fs.statSync(url);

console.log(result.isFile()); //false
console.log(result.isDirectory()); //true